const action = (type, payload) => {
  return {
    type,
    payload
  };
};

export const SEARCH_MUSICALL = parm => dispatch => {
  fetch(`http://106.12.79.128:666/search?keywords=${parm}&type=1000`)
    .then(res => res.json())
    .then(res => {
      return dispatch(action("SEARCH_MUSICALL", res.result));
    });
};
